<div id="content">
	<section widget-grid id="widget-grid">
		<div class="row">
			<article class="col-sm-12">
				<div id="todo-widget" jarvis-widget data-widget-editbutton="false" data-widget-color="blue">
					<header>

						<span class="widget-icon">
							<i class="fa fa-table"></i>
						</span>
						<div class="widget-toolbar">
                            <button class="btn btn-xs btn-col-fff" ng-class="{active: newTodo}" ng-click="toggleAdd()"><i ng-class="{ 'fa fa-plus': !newTodo, 'fa fa-times': newTodo}"></i> 筛选</button>
							<button class="btn btn-col-fff btn-xs" ng-click="editCustomerModal(1)">新增客户</button>
						</div>
					</header>


					<div>
                        <div class="widget-body tab-content">
                            <!--头部筛选查找以及添加-->
                            <div class="widget-body-toolbar" ng-show="newTodo">
                                <div class="form-horizontal">
                            		<div class="row">
                            			<div class="col-md-2 col-xs-4 ">
                                            <div class="form-group">
                                                <input type="text" class="form-control inp_2" placeholder="客户姓名" ng-model="filter.username">
                                            </div>
                                		</div>
                                		<div class="col-sm-1 col-xs-2 text-center col-xs-offset-0 col-md-offset-0">
                                    		<div class="form-group">
                                        		<a class="btn btn-default search" ng-click="search(filter)" href-void>搜索</a>
                                    		</div>
                                		</div>
                                    </div>
                                </div>
                            </div>
                            <form class="form-inline">
                                <div class="table-scroll">
                                    <table class="table table-bordered table-hover">
                                        <thead>
                                            <tr>
                                                <th class="text-center">客户名</th>
                                                <th class="text-center">Skype</th>
                                                <th class="text-center">QQ</th>
                                                <th class="text-center">电话</th>
                                                <th class="text-center">微信</th>
                                                <th class="text-center">邮箱</th>
                                                <th class="text-center">负责人</th>
                                                <th class="text-center">订单（进行中/待续费/已过期）</th>
                                                <th class="text-center">操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr ng-repeat="g in userList"  class="text-center">
                                                <td><a class="cusor" style="color:#0066FF" ng-click="goMainEngineDetail(g.ids)">{{g.username}}</a></td>
                                                <td>{{g.skype}}</td>
                                                <td>{{g.qq}}</td>
                                                <td>{{g.phone}}</td>
                                                <td>{{g.wechat}}</td>
                                                <td>{{g.email}}</td>
                                                <td>{{g.dutyEmail}}</td>
                                                <td>
                                                    <a class="cursor" style="color:#00FF33;">{{g.orderIn}}</a>
                                                    /
                                                    <a class="cursor" style="color:#0066FF">{{g.orderRenew}}</a> 
                                                    /
                                                    <a class="cursor" style="color:#FF0000">{{g.orderOver}}</a> 
                                                </td>
                                                <td>
                                                    <button class="btn btn-xs btn-primary" ng-click="editCustomerModal(2,g)">修改</button>
                                                    <button class="btn btn-xs btn-danger" ng-click="deleteCustomer(g,$index)">删除</button>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                                <tm-pagination conf="paginationConf"></tm-pagination>
                            </form>
                        </div>
                    </div>
				</div>
			</article>
		</div>
	</section>
</div>




<!--新增客户弹框-->
    <div class="modal fade" id="customerModal" tabindex="-1" role="dialog" aria-labelledby="addAccount" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" id="addAccount">{{type==1?"新增":"修改"}}客户</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                    	<div class="col-md-1 col-xs-3 col-lg-3 input-label">
                            <b style="color: #FF0000;">*</b>客户姓名：
                        </div>
                		<div class="col-md-2 col-xs-6 col-lg-6">
                            <div class="form-group">
                                <input type="text" class="form-control inp_2" placeholder="请输入" ng-model="info.username">
                            </div>
                		</div>
                    </div>

                    <div class="row">
                        <div class="col-md-1 col-xs-3 col-lg-3 input-label">
                            Skype：
                        </div>
                        <div class="col-md-2 col-xs-6 col-lg-6">
                            <div class="form-group">
                                <input type="text" class="form-control inp_2" placeholder="请输入" ng-model="info.skype">
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-1 col-xs-3 col-lg-3 input-label">
                            QQ：
                        </div>
                        <div class="col-md-2 col-xs-6 col-lg-6">
                            <div class="form-group">
                                <input type="text" class="form-control inp_2" placeholder="请输入" ng-model="info.qq">
                            </div>
                        </div>
                    </div>
                       
                    <div class="row">
                        <div class="col-md-1 col-xs-3 col-lg-3 input-label">
                            微信：
                        </div>
                        <div class="col-md-2 col-xs-6 col-lg-6">
                            <div class="form-group">
                                <input type="text" class="form-control inp_2" placeholder="请输入" ng-model="info.wechat">
                            </div>
                        </div>
                    </div>
                    
                    <div class="row">
                        <div class="col-md-1 col-xs-3 col-lg-3 input-label">
                            <b style="color: #FF0000;">*</b>联系电话：
                        </div>
                        <div class="col-md-2 col-xs-6 col-lg-6">
                            <div class="form-group">
                                <input type="text" class="form-control inp_2" placeholder="请输入" ng-model="info.phone">
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-1 col-xs-3 col-lg-3 input-label">
                            邮箱：
                        </div>
                        <div class="col-md-2 col-xs-6 col-lg-6 pr">
                            <div class="form-group">
                                <input type="text" class="form-control inp_2" placeholder="请输入" ng-model="info.email">
                            </div>
                            <div class="questionMark pa" data-toggle="tooltip" 
                            data-placement="top" title="邮箱格式如：xxx@168.com、
                            xxx@qq.com">?</div>
                        </div>
                    </div>
                

                    <div class="row">
                        <div class="col-md-1 col-xs-3 col-lg-3 input-label">
                            <b style="color: #FF0000;">*</b>负责人：
                        </div>
                        <div class="col-md-2 col-xs-6 col-lg-6">
                            <div class="form-group">
                                <select class="form-control" ng-model="info.dutyEmail">
                                    <option value="0">请选择</option>
                                    <option ng-value="o.id" ng-repeat="o in mainEngineArea">{{o.title}}</option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" ng-click="editCustomerModalSure(info)">确定</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </div>
            </div>
        </div>
    </div>
<style>
    .questionMark{    
        top: 6px;
        right: -20px;
        width: 18px;
        border: 1px solid;
        border-radius: 50%;
        text-align: center;
        line-height: 18px;
    }
</style>
